<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        /* 显示或隐藏的过渡效果 */
        .ardai-enter-active,.ardai-leave-active{
            /* 过渡时间为1秒 */
            transition: opacity  1s; 
        }
        /* 显示前和隐藏后 */
        .ardai-enter,.ardai-leave-to{
            /* 都为隐藏效果 */
            opacity: 0;
        }
        /* 显示过渡效果1s */
        .cq-enter-active{
            transition: all 1s;
        }
        /* 隐藏过渡效果3s */
        .cq-leave-active{
            transition: all 3s;
        }
        /* 显示前或隐藏后效果 */
        .cq-enter,.cq-leave-to{
            opacity: 0;
            transform: translateX(10px);
        }
    </style>
</head>
<body>
    <div id="app">
        <button @click="show = !show">渐变过渡</button>
        <!-- 过滤动画 -->
        <transition name="ardai">
            <p v-show="show">my name is ardai</p>
        </transition>
    </div>
    <div id="app2">
        <button @click="show = !show">渐变过渡</button>
        <!-- 过滤动画 -->
        <transition name="cq">
            <p v-show="show">my name is ardai</p>
        </transition>
    </div>
    <script src="./node_modules/vue/dist/vue.js"></script>
    <script>
        new Vue({
            el:"#app",
            data:{
                show:true,
            }
        })
        new Vue({
            el:"#app2",
            data:{
                show:true,
            }
        })
    </script>
</body>
</html>